<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.box{
				display: flex;
			 	/* align-items: center; /* 侧轴方向水平居中 */ */
				
				/* align-items: stretch; /* 如果子级没有高度则拉伸子级 */ */
				
				margin:auto;
				height: 400px;
				border: 1px solid #000;
			}
			
			.box div{
				width: 100px;
				height: 100px;
				background-color: aqua;
			}
			
			/* 只让第二个元素水平居中*/ 
			.box div:nth-child(2){
				align-self: center;  /* 单独给某个元素添加属性 */
				
			}
		</style>
	</head>
	<body>
		<div class="box">
			<div>1</div>
			<div>2</div>
			<div>3</div>
		</div>
	</body>
</html>